home *** CD-ROM | disk | FTP | other *** search
/ Software of the Month Club 2000 October / Software of the Month - Ultimate Collection Shareware 277.iso / pc / PROGRAMS / UTILITY / WINLINUX / DATA1.CAB / programs_-_include / ASM-MIPS / BOOTINFO.H < prev    next >
C/C++ Source or Header  |  1999-09-17  |  7KB  |  299 lines

  1. /* $Id: bootinfo.h,v 1.5 1998/08/19 21:58:10 ralf Exp $
  2.  *
  3.  * bootinfo.h -- Definition of the Linux/MIPS boot information structure
  4.  *
  5.  * Copyright (C) 1995, 1996 by Ralf Baechle, Andreas Busse,
  6.  *                             Stoned Elipot and Paul M. Antoine.
  7.  *
  8.  * This file is subject to the terms and conditions of the GNU General Public
  9.  * License.  See the file COPYING in the main directory of this archive
  10.  * for more details.
  11.  */
  12. #ifndef __ASM_MIPS_BOOTINFO_H
  13. #define __ASM_MIPS_BOOTINFO_H
  14.  
  15. /* XXX */
  16. #include <linux/config.h>
  17.  
  18. /*
  19.  * Values for machgroup
  20.  */
  21. #define MACH_GROUP_UNKNOWN      0 /* whatever... */
  22. #define MACH_GROUP_JAZZ         1 /* Jazz                                     */
  23. #define MACH_GROUP_DEC          2 /* Digital Equipment                        */
  24. #define MACH_GROUP_ARC        3 /* Wreckstation Tyne, rPC44, possibly other */
  25. #define MACH_GROUP_SNI_RM    4 /* Siemens Nixdorf RM series                */
  26. #define MACH_GROUP_ACN        5
  27. #define MACH_GROUP_SGI          6 /* Silicon Graphics workstations and servers */
  28. #define MACH_GROUP_RESERVED     7 /* No Such Architecture               */
  29.  
  30. #define GROUP_NAMES { "unknown", "Jazz", "Digital", "ARC", \
  31.                       "SNI", "ACN", "SGI", "NSA" }
  32.  
  33. /*
  34.  * Valid machtype values for group unknown (low order halfword of mips_machtype)
  35.  */
  36. #define MACH_UNKNOWN        0    /* whatever...            */
  37.  
  38. #define GROUP_UNKNOWN_NAMES { "unknown" }
  39.  
  40. /*
  41.  * Valid machtype values for group JAZZ
  42.  */
  43. #define MACH_ACER_PICA_61    0    /* Acer PICA-61 (PICA1)        */
  44. #define MACH_MIPS_MAGNUM_4000    1    /* Mips Magnum 4000 "RC4030"    */
  45. #define MACH_OLIVETTI_M700      2    /* Olivetti M700-10 (-15 ??)    */
  46.  
  47. #define GROUP_JAZZ_NAMES { "Acer PICA 61", "Mips Magnum 4000", "Olivetti M700" }
  48.  
  49. /*
  50.  * Valid machtype for group DEC 
  51.  */
  52. /* FIXME: this is a very fuzzy name, and we got a big "name space now" */
  53. /* So otiginal DEC codes can be used -Stoned */
  54. #define MACH_DECSTATION        0    /* DECStation 5000/2x for now */
  55.  
  56. #define GROUP_DEC_NAMES { "3min" }
  57.  
  58. /*
  59.  * Valid machtype for group ARC
  60.  */
  61. #define MACH_DESKSTATION_RPC44  0    /* Deskstation rPC44 */
  62. #define MACH_DESKSTATION_TYNE    1    /* Deskstation Tyne */
  63.  
  64. #define GROUP_ARC_NAMES { "Deskstation rPC44", "Deskstation Tyne" }
  65.  
  66. /*
  67.  * Valid machtype for group SNI_RM
  68.  */
  69. #define MACH_SNI_RM200_PCI    0    /* RM200/RM300/RM400 PCI series */
  70.  
  71. #define GROUP_SNI_RM_NAMES { "RM200 PCI" }
  72.  
  73. /*
  74.  * Valid machtype for group ACN
  75.  */
  76. #define MACH_ACN_MIPS_BOARD    0       /* ACN MIPS single board        */
  77.  
  78. #define GROUP_ACN_NAMES { "ACN" }
  79.  
  80. /*
  81.  * Valid machtype for group SGI
  82.  */
  83. #define MACH_SGI_INDY        0    /* R4?K and R5K Indy workstaions */
  84.  
  85. #define GROUP_SGI_NAMES { "Indy" }
  86.  
  87. /*
  88.  * Valid cputype values
  89.  */
  90. #define CPU_UNKNOWN        0
  91. #define CPU_R2000        1
  92. #define CPU_R3000        2
  93. #define CPU_R3000A        3
  94. #define CPU_R3041        4
  95. #define CPU_R3051        5
  96. #define CPU_R3052        6
  97. #define CPU_R3081        7
  98. #define CPU_R3081E        8
  99. #define CPU_R4000PC        9
  100. #define CPU_R4000SC        10
  101. #define CPU_R4000MC        11
  102. #define CPU_R4200        12
  103. #define CPU_R4400PC        13
  104. #define CPU_R4400SC        14
  105. #define CPU_R4400MC        15
  106. #define CPU_R4600        16
  107. #define CPU_R6000        17
  108. #define CPU_R6000A        18
  109. #define CPU_R8000        19
  110. #define CPU_R10000        20
  111. #define CPU_R4300        21
  112. #define CPU_R4650        22
  113. #define CPU_R4700        23
  114. #define CPU_R5000        24
  115. #define CPU_R5000A        25
  116. #define CPU_R4640        26
  117. #define CPU_NEVADA        27    /* RM5230, RM5260 */
  118. #define CPU_LAST        27
  119.  
  120. #define CPU_NAMES { "unknown", "R2000", "R3000", "R3000A", "R3041", "R3051", \
  121.         "R3052", "R3081", "R3081E", "R4000PC", "R4000SC", "R4000MC",         \
  122.         "R4200", "R4400PC", "R4400SC", "R4400MC", "R4600", "R6000",          \
  123.         "R6000A", "R8000", "R10000", "R4300", "R4650", "R4700", "R5000",     \
  124.         "R5000A", "R4640", "Nevada" }
  125.  
  126. #define CL_SIZE      (80)
  127.  
  128. #ifndef _LANGUAGE_ASSEMBLY
  129.  
  130. /*
  131.  * Some machine parameters passed by the bootloaders. 
  132.  */
  133.  
  134. struct drive_info_struct {
  135.     char dummy[32];
  136. };
  137.  
  138. /* This is the same as in Milo but renamed for the sake of kernel's */
  139. /* namespace */
  140. typedef struct mips_arc_DisplayInfo {    /* video adapter information */
  141.     unsigned short cursor_x;
  142.     unsigned short cursor_y;
  143.     unsigned short columns;
  144.     unsigned short lines;
  145. } mips_arc_DisplayInfo;
  146.  
  147. /*
  148.  * New style bootinfo
  149.  *
  150.  * Add new tags only at the end of the enum; *never* remove any tags
  151.  * or you'll break compatibility!
  152.  */
  153. enum bi_tag {
  154.      /*
  155.       * not a real tag
  156.       */
  157.     tag_dummy,
  158.  
  159.      /*
  160.       * machine type
  161.       */
  162.     tag_machtype,
  163.  
  164.      /*
  165.       * system CPU & FPU
  166.       */
  167.     tag_cputype,
  168.  
  169.      /*
  170.       * Installed RAM
  171.       */
  172.     tag_memlower,
  173.     tag_memupper,
  174.  
  175.      /*
  176.       * Cache Sizes (0xffffffff = unknown)
  177.       */
  178.     tag_icache_size,
  179.     tag_icache_linesize,
  180.     tag_dcache_size,
  181.     tag_dcache_linesize,
  182.     tag_scache_size,
  183.     tag_scache_linesize,
  184.  
  185.      /*
  186.       * TLB Info
  187.       */
  188.     tag_tlb_entries,
  189.  
  190.      /*
  191.       * DMA buffer size (Deskstation only)
  192.       */
  193.     tag_dma_cache_size,
  194.     tag_dma_cache_base,
  195.  
  196.      /*
  197.      * Ramdisk Info 
  198.       */
  199.     tag_ramdisk_size,        /* ramdisk size in 1024 byte blocks */
  200.     tag_ramdisk_base,        /* address of the ram disk in mem */
  201.  
  202.      /*
  203.       * Boot flags for the kernel
  204.       */
  205.     tag_mount_root_rdonly,
  206.     tag_drive_info,
  207.  
  208.      /*
  209.       * Video ram info (not in tty.h)
  210.       */
  211.     tag_vram_base,            /* video ram base address */
  212.        
  213.     tag_command_line,        /* kernel command line parameters */
  214.  
  215.         /*
  216.          * machine group
  217.          */
  218.     tag_machgroup,
  219.  
  220.     /*
  221.      * info on the display from the ARC BIOS
  222.      */
  223.     tag_arcdisplayinfo,
  224.  
  225.     /*
  226.      * tag to pass a complete struct screen_info
  227.      */
  228.     tag_screen_info
  229. };
  230.  
  231. /* struct defining a tag */
  232. typedef struct {
  233.     enum bi_tag tag;
  234.     unsigned long size;
  235. } tag;
  236.  
  237. /* struct to define a tag and it's data */
  238. typedef struct {
  239.     tag t;
  240.     void* d;
  241. } tag_def;
  242.  
  243. /* macros for parsing tag list */
  244. #define TAGVALPTR(t) ((void*)(((void*)(t)) - ((t)->size)))
  245. #define NEXTTAGPTR(t) ((void*)(TAGVALPTR(t) - (sizeof(tag))))
  246.  
  247. /* size macros for tag size field */
  248. #define UCHARSIZE (sizeof(unsigned char))
  249. #define ULONGSIZE (sizeof(unsigned long))
  250. #define UINTSIZE  (sizeof(unsigned int))
  251. #define DRVINFOSIZE (sizeof(struct drive_info_struct))
  252. #define CMDLINESIZE (sizeof(char[CL_SIZE])
  253.  
  254. /*
  255.  * For tag readers aka the kernel
  256.  */
  257. tag *bi_TagFind(enum bi_tag type);
  258. void bi_EarlySnarf(void);
  259.  
  260. /* For tag creators aka bootloaders */
  261. /* Now implemented in Milo 0.26 */
  262. int bi_TagAdd(enum bi_tag type, unsigned long size, void *data);
  263. int bi_TagAddList(tag_def* taglist);
  264. void bi_TagWalk(void); 
  265.  
  266.  
  267. #ifdef CONFIG_SGI
  268. /* screen info will dissapear... soon */
  269. //#define DEFAULT_SCREEN_INFO {0, 0, 0, 0, 0, 158, 0, 0, 0, 62, 0, 16}
  270. #define DEFAULT_SCREEN_INFO {0, 0, 0, 0, 0, 160, 0, 0, 0, 64, 0, 16}
  271. #define DEFAULT_DRIVE_INFO { {0,}}
  272. #else
  273. /* default values for screen_info variable */
  274. #define DEFAULT_SCREEN_INFO {0, 0, 0, 52, 3, 80, 4626, 3, 9, 50}
  275. #endif
  276.  
  277. /* default values for drive info */
  278. #define DEFAULT_DRIVE_INFO { {0,}}
  279.  
  280.  
  281. /*
  282.  * These are the kernel variables initialized from
  283.  * the tag. And they have to be initialized to dummy/default
  284.  * values in setup.c (or whereever suitable) so they are in
  285.  * .data section
  286.  */
  287. extern unsigned long mips_memory_upper;
  288. extern unsigned long mips_cputype;
  289. extern unsigned long mips_machtype;
  290. extern unsigned long mips_machgroup;
  291. extern unsigned long mips_tlb_entries;
  292. extern unsigned long mips_vram_base;
  293. extern unsigned long mips_dma_cache_size;
  294. extern unsigned long mips_dma_cache_base;
  295.  
  296. #endif /* _LANGUAGE_ASSEMBLY */
  297.  
  298. #endif /* __ASM_MIPS_BOOTINFO_H */
  299.